/*
 * Copyright 2011-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0.
 * See `LICENSE` in the project root for license information.
 */

package me.ijleex.mgmt.system.menu.entity;

import org.apache.ibatis.type.Alias;

import me.ijleex.mgmt.system.menu.mapper.MenuMapper;

/**
 * 用户菜单
 *
 * <p>表示 已授权给指定用户的菜单的信息</p>
 *
 * @author liym
 * @version 2016-08-15 14:48:23 新建 —— 用表连接的方式查询用户的菜单
 * @since 2019-03-14 14:14 复用
 */
@Alias("UserMenu")
public class UserMenu extends Menu {

    /** 用户ID */
    private Long userId;
    /** 用户名 */
    private String username;

    /** 角色ID */
    private Long roleId;
    /** 角色名称 */
    private String roleName;

    /**
     * 用于 {@link MenuMapper#selectRootMenuByUser(UserMenu)} 方法
     *
     * @param userId 用户ID
     * @param systemId 系统标识符
     */
    public UserMenu(Long userId, String systemId) {
        this.userId = userId;
        super.setSystemId(systemId);
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

}
